<div class="plus-admin-card">
    <div class="block-body">
        <div class="layui-row">
            <form class="layui-form" action="" lay-filter="setting">
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="text-red">*</span>名称</label>
                    <div class="layui-input-block">
                        <input type="text" lay-verify="required" placeholder="" class="layui-input" value="Plus Admin">
                        <div class="input-tip">全站显示Title位置</div>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label"><span class="text-red">*</span>SEO关键字</label>
                    <div class="layui-input-block">
                        <input type="text" name="keyword" lay-verify="required" placeholder="请输入关键字" autocomplete="off"
                            class="layui-input">
                        <div class="input-tip">请使用英文逗号分开</div>
                    </div>
                </div>
                <div class=" layui-form-item">
                    <label class="layui-form-label"><span class="text-red">*</span>描述</label>
                    <div class="layui-input-block">
                        <textarea name="description" placeholder="" class="layui-textarea"></textarea>
                    </div>
                </div>
                <div class="layui-form-item">
                    <label class="layui-form-label">状态：</label>
                    <div class="layui-input-block">
                        <input type="checkbox" name="status" lay-skin="switch" lay-text="已运行|已关闭" value="1" checked>
                    </div>
                </div>
                <div class="layui-form-item">
                    <div class="layui-input-block">
                        <button class="layui-btn primary" lay-submit lay-filter="setting">立即提交
                        </button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>

<script>
    layui.use(['form'], function () {
        var $ = layui.jquery;
        var form = layui.form;

        //监听提交
        form.on('submit(setting)', function (data) {
            layer.msg(JSON.stringify(data.field));
            return false;
        });
        form.render();
    });
</script>